<?php
	header('Content-Type:application/json');  //此声明非常重要
	include('connect.php');
	if($_POST['value'] !='' and$_POST['user']!=''){
	$value = addslashes(htmlspecialchars($_POST['value']));
	$user = addslashes(htmlspecialchars($_POST['user']));
	}
	$sql = "call addnotice('{$user}', '{$value}')";
	$notice =$db->query($sql);
	if($notice){
		$json['code']=1;
		$json['msg']='添加新通知成功';
		 echo (json_encode($json)) ;
	}else{
		$json['code']=0;
		$json['msg']='添加新通知失败';
		 echo (json_encode($json)) ;
	}
		
?>